package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

@Getter
@Setter
public class Notice {
    private Long id;

    private Employee issuer;//发布人

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date pubDate;//发布时间

    private String title;//发布标题

    private String content;//发布内容

    private boolean read;//是否已读




    public String getJson(){
        HashMap<Object, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("pubDate",pubDate);
        map.put("title",title);
        map.put("content",content);
        return JSON.toJSONString(map);
    }

}